home *** CD-ROM | disk | FTP | other *** search
/ SGI Performance Co-Pilot 1.3 / SGI Performance Co-Pilot 1.3.iso / dist / pcp.idb / usr / share / catman / u_man / cat1 / dbpmda.z / dbpmda
Text File  |  1997-04-03  |  11KB  |  265 lines

  1.  
  2.  
  3.  
  4. DDDDBBBBPPPPMMMMDDDDAAAA((((1111))))                                                            DDDDBBBBPPPPMMMMDDDDAAAA((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ddddbbbbppppmmmmddddaaaa - debugger for Performance Co-Pilot PMDA
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ////uuuussssrrrr////ppppccccpppp////bbbbiiiinnnn////ddddbbbbppppmmmmddddaaaa [----eeeeiiii] [----DDDD _d_e_b_u_g] [----nnnn _n_a_m_e_s_p_a_c_e]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      ddddbbbbppppmmmmddddaaaa is an interactive interface to the interactions between a PPPPMMMMDDDDAAAA(3)
  16.      and ppppmmmmccccdddd(1).  This allows Performance Metric Domain Agents (PMDAs) to be
  17.      attached, initialized and exercised to test for correctness.
  18.  
  19.      ddddbbbbppppmmmmddddaaaa interactively prompts the user for commands, many of which emulate
  20.      the Protocol Data Units (PDUs) that may be sent by a ppppmmmmccccdddd(1) process.
  21.      After running ddddbbbbppppmmmmddddaaaa, enter the command hhhheeeellllpppp to get a list of the
  22.      available commands.  The example section below illustrates a session
  23.      using ddddbbbbppppmmmmddddaaaa to test a PMDA.
  24.  
  25.      To simplify repetitive testing of a PMDA, the file ._d_b_p_m_d_a_r_c in the
  26.      current working directory can contain a list of commands that will be
  27.      executed by ddddbbbbppppmmmmddddaaaa on startup, before the user is prompted to enter
  28.      further commands interactively.
  29.  
  30.      ddddbbbbppppmmmmddddaaaa accepts the following command line arguments:
  31.  
  32.      ----DDDD   Set the PPPPMMMMAAAAPPPPIIII(3) debug control variable (ppppmmmmDDDDeeeebbbbuuuugggg) to start with the
  33.           value _d_e_b_u_g.  This value should be a combination of the flags
  34.           described by ppppmmmmddddbbbbgggg(1).  This value can be set within a ddddbbbbppppmmmmddddaaaa
  35.           session with the ddddeeeebbbbuuuugggg command.
  36.  
  37.      ----eeee   Echo the input to ssssttttddddoooouuuutttt.
  38.  
  39.      ----iiii   Emulate interactive behavior and prompt for new commands, even if
  40.           standard input is not a tty device.
  41.  
  42.      ----nnnn   Specify the _n_a_m_e_s_p_a_c_e that ddddbbbbppppmmmmddddaaaa should use.
  43.  
  44.      As there are no timeout constraints on a PMDA while using ddddbbbbppppmmmmddddaaaa (as
  45.      compared to ppppmmmmccccdddd(1)), another debugger like ddddbbbbxxxx(1) can be used on the
  46.      PMDA process once it has been attached.
  47.  
  48. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  49.      Below is a ddddbbbbppppmmmmddddaaaa session using the _s_i_m_p_l_e PMDA. A ....ddddbbbbppppmmmmddddaaaarrrrcccc file is used
  50.      to set the debugging flag, open the PMDA and display the current status
  51.      of the debugger:
  52.  
  53.           $ cat .dbpmdarc
  54.           debug libpmda
  55.           open dso mips_o32.pmda_simple.so simple_init 253
  56.           status
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. DDDDBBBBPPPPMMMMDDDDAAAA((((1111))))                                                            DDDDBBBBPPPPMMMMDDDDAAAA((((1111))))
  71.  
  72.  
  73.  
  74.      When ddddbbbbppppmmmmddddaaaa is run, the commands in the ....ddddbbbbppppmmmmddddaaaarrrrcccc file are executed
  75.      first:
  76.  
  77.           $ dbpmda
  78.           [Thu Apr 18 09:40:35] pcp(11268) Debug: help file /var/pcp/config/simple/help
  79.           opened
  80.           [Thu Apr 18 09:40:35] pcp(11268) Info: name        = simple DSO
  81.           [Thu Apr 18 09:40:35] pcp(11268) Info: domain      = 253
  82.           [Thu Apr 18 09:40:35] pcp(11268) Info: num metrics = 4
  83.           [Thu Apr 18 09:40:35] pcp(11268) Info: num indom   = 1
  84.           [Thu Apr 18 09:40:35] pcp(11268) Info: direct map  = 1
  85.  
  86.           PMDA       = mips_o32.pmda_simple.so
  87.           Connection = dso
  88.           pmDebug    = 32768 ( libpmda )
  89.           Timer      = off
  90.  
  91.           Dump Instance Profile state=INCLUDE, 0 profiles
  92.  
  93.  
  94.      To examine the metric and instance descriptors, the ddddeeeesssscccc and iiiinnnnssssttttaaaannnncccceeee
  95.      commands can be used.  Metrics may be identified either by name, or using
  96.      the ``dotted'' notation to specify the domain, cluster and item fields of
  97.      a PMID.  Instance domains must be identified using a ``dotted'' notation
  98.      to specify the domain and serial fields. The syntax for most commands
  99.      will be displayed if the command is given without any arguments:
  100.  
  101.           dbpmda> desc 253.0.0
  102.           PMID: 253.0.0
  103.               Data Type: 32-bit unsigned int  InDom: PM_INDOM_NULL 0xffffffff
  104.               Semantics: instant  Units: none
  105.           dbpmda> instance
  106.           instance indom# [ number | name | "name" ]
  107.           dbpmda> instance 253.1
  108.           pmInDom: 253.1
  109.           [  0] inst: 0 name: "red"
  110.           [  1] inst: 1 name: "green"
  111.           [  2] inst: 2 name: "blue"
  112.  
  113.      To test the most important component of a PMDA, the ffffeeeettttcccchhhh, it is often
  114.      useful to determine the time it takes the PMDA to respond.  The ttttiiiimmmmeeeerrrr may
  115.      be turned on before giving a ffffeeeettttcccchhhh:
  116.  
  117.           dbpmda> timer on
  118.           dbpmda> fetch simple.numfetch 253.0.1
  119.           PMID(s): 253.0.0 253.0.1
  120.           pmResult dump from 0x100078e0 timestamp: 0.000000 11:00:00.000 numpmid: 2
  121.             253.0.0 (simple.numfetch): numval: 1 valfmt: 0 vlist[]:
  122.              value 1
  123.             253.0.1 (simple.color): numval: 3 valfmt: 0 vlist[]:
  124.               inst [0 or ???] value 1
  125.               inst [1 or ???] value 101
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. DDDDBBBBPPPPMMMMDDDDAAAA((((1111))))                                                            DDDDBBBBPPPPMMMMDDDDAAAA((((1111))))
  137.  
  138.  
  139.  
  140.               inst [2 or ???] value 201
  141.           Timer: 0.003921 seconds
  142.           dbpmda> timer off
  143.  
  144.      The simple PMDA also supports the ssssttttoooorrrreeee operation which can be tested
  145.      with subsequent ffffeeeettttcccchhhh commands:
  146.  
  147.           dbpmda> store simple.numfetch "42"
  148.           PMID: 253.0.0
  149.           Getting description...
  150.           Getting Result Structure...
  151.           253.0.0: 2 -> 42
  152.           dbpmda> fetch simple.numfetch
  153.           PMID(s): 253.0.0
  154.           pmResult dump from 0x100078e0 timestamp: 0.000000 11:00:00.000 numpmid: 1
  155.             253.0.0 (simple.numfetch): numval: 1 valfmt: 0 vlist[]:
  156.              value 43
  157.  
  158.      A pppprrrrooooffffiiiilllleeee can be specified for each instance domain which includes all,
  159.      some or no instances:
  160.  
  161.           dbpmda> help profile
  162.  
  163.           profile indom# [ all | none ]
  164.           profile indom# [ add | delete ] number
  165.  
  166.           For the instance domain specified, the profile may be changed to
  167.           include 'all' instances, no instances, add an instance or delete
  168.           an instance.
  169.  
  170.           dbpmda> profile 253.1 none
  171.           dbpmda> fetch 253.0.1
  172.           PMID(s): 253.0.1
  173.           pmResult dump from 0x100078e0 timestamp: 0.000000 11:00:00.000 numpmid: 1
  174.             253.0.1 (simple.color): No values returned!
  175.           dbpmda> profile 253.1 add 2
  176.           dbpmda> fetch 253.0.1
  177.           PMID(s): 253.0.1
  178.           pmResult dump from 0x100078e0 timestamp: 0.000000 11:00:00.000 numpmid: 1
  179.             253.0.1 (simple.color): numval: 1 valfmt: 0 vlist[]:
  180.              value 202
  181.           dbpmda> profile 253.1 add 0
  182.           dbpmda> fetch 253.0.1
  183.           PMID(s): 253.0.1
  184.           pmResult dump from 0x100078e0 timestamp: 0.000000 11:00:00.000 numpmid: 1
  185.             253.0.1 (simple.color): numval: 2 valfmt: 0 vlist[]:
  186.               inst [0 or ???] value 2
  187.               inst [2 or ???] value 203
  188.           dbpmda> status
  189.  
  190.           PMDA       = mips_o32.pmda_simple.so
  191.           Connection = dso
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. DDDDBBBBPPPPMMMMDDDDAAAA((((1111))))                                                            DDDDBBBBPPPPMMMMDDDDAAAA((((1111))))
  203.  
  204.  
  205.  
  206.           pmDebug    = 32768 ( libpmda )
  207.           Timer      = off
  208.  
  209.           Dump Instance Profile state=INCLUDE, 1 profiles
  210.                   Profile [0] indom=1061158913 [253.1] state=EXCLUDE 2 instances
  211.                           Instances: [2] [0]
  212.           dbpmda> quit
  213.  
  214. CCCCAAAAVVVVEEEEAAAATTTTSSSS
  215.      A value cannot be stored into a metric of type PPPPMMMM____TTTTYYYYPPPPEEEE____AAAAGGGGGGGGRRRREEEEGGGGAAAATTTTEEEE.
  216.  
  217.      The ffffeeeettttcccchhhh command will display all values as integers regardless of their
  218.      actual type.  This is consistent with the behavior of ppppmmmmccccdddd(1) which does
  219.      obtain and use the metric description structure.
  220.  
  221.      ddddbbbbppppmmmmddddaaaa uses ffffoooorrrrkkkk(2) and eeeexxxxeeeecccc(2) to attach to daemon PMDAs. ddddbbbbppppmmmmddddaaaa makes
  222.      no attempt to detect the end of the daemon PMDA process, so it is
  223.      possible for a PMDA to exit unexpectedly without any notification.
  224.      However, any communication with the PMDA will result in errors which will
  225.      indicate that the PMDA is no longer responding.
  226.  
  227. FFFFIIIILLLLEEEESSSS
  228.      ./._d_b_p_m_d_a_r_c              List of commands to do on startup.
  229.  
  230. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  231.      ppppmmmmddddbbbbgggg(1), ppppmmmmccccdddd(1), ffffoooorrrrkkkk(2), eeeexxxxeeeecccc(2), PPPPMMMMAAAAPPPPIIII(3) and PPPPMMMMDDDDAAAA(3).
  232.  
  233. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  234.      Are intended to be self explanatory.
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.